package com.dq.domain.goods;

import com.dq.vo.baseVo.VO;
import com.dq.domain.base.BaseEntity;
import com.dq.domain.org.Org;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

/**
 * @author liuhui
 * @date 2019/10/11 0011 17:15:04
 */
@Data
@Entity
public class HotSearchGoods extends BaseEntity implements VO.ToVO {
    protected String name;

    protected Long searchNum;

    @ManyToOne
    protected Org org;


    @Data
    @ApiModel(value = "热门检索词汇视图")
    public static class Vo implements VO {
        private String name;
    }

    @Override
    public VO toVO(boolean isRecursion) {
        Vo vo = new Vo();
        vo.name = fmt(this.name);
        return vo;
    }
}
